package cn.ac.ict.fpevaluation.cluster.name;

import cn.ac.ict.fpevaluation.bean.AtomTrajectoryBean;
import cn.ac.ict.fpevaluation.cluster.DataOperationToConsoleUtil;
import cn.ac.ict.fpevaluation.constant.Constant;
import cn.ac.ict.fpevaluation.utils.DataOperationToDiskUtils;

import java.util.List;

/**
 * Created by feng on 2017/2/22.
 * <p>
 * {@link ClassifyBasedName}聚类算法的入口
 */
public class NameHelper {

    public static List<List<AtomTrajectoryBean>> launch() {
        List<AtomTrajectoryBean> atomTrajectories = DataOperationToDiskUtils.getOriginalData();

        ClassifyBasedName classifyBasedName = new ClassifyBasedName(atomTrajectories);
        List<List<AtomTrajectoryBean>> res = classifyBasedName.launch();

        DataOperationToDiskUtils.writeClusterResultToDisk(res, Constant.CLUSTER_RESULT);

        DataOperationToConsoleUtil.printClusterInfo("【基于路径起始编号的聚类算法】", res);

        return res;
    }

}
